package ticks.chromedome.commands;

import Threads.ArduinoSerial;
import Threads.VisionProcessing;
import edu.wpi.first.wpilibj.SerialPort;
import edu.wpi.first.wpilibj.command.Command;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
import ticks.chromedome.GlobalData;
import ticks.chromedome.OI;
import ticks.chromedome.subsystems.CameraLight;
import ticks.chromedome.subsystems.Drive;
import ticks.chromedome.subsystems.Elevator;
import ticks.chromedome.subsystems.ExampleSubsystem;
import ticks.chromedome.subsystems.PottyChair;
import ticks.chromedome.subsystems.ShooterPID;
import ticks.chromedome.subsystems.SlashBarPID;
import ticks.chromedome.subsystems.Stopper;
import ticks.chromedome.subsystems.Suspension;
import ticks.chromedome.subsystems.Turret;

/**
 * The base for all commands. All atomic commands should subclass CommandBase.
 * CommandBase stores creates and stores each control system. To access a
 * subsystem elsewhere in your code in your code use CommandBase.exampleSubsystem
 * @author Author
 */
public abstract class CommandBase extends Command {

/**
 * static slash
 */
    public static SlashBarPID slash_static_instance; 
    public static ShooterPID shooter_static;
    public static GlobalData robot_global;
    public static ShooterSpeedControl shooter_control;
    
    //special case for pid
    // Create a single static instance of all of your subsystems
    public static ExampleSubsystem exampleSubsystem = new ExampleSubsystem();

    public static void init() {
        // This MUST be here. If the OI creates Commands (which it very likely
        // will), constructing it during the construction of CommandBase (from
        // which commands extend), subsystems are not guaranteed to be
        // yet. Thus, their requires() statements may grab null pointers. Bad
        // news. Don't move it.
        robot_global = new GlobalData();
        slash_static_instance = new SlashBarPID();
        shooter_static = new ShooterPID();
        shooter_control = new ShooterSpeedControl();
         OI.getInstance();
         CameraLight.getInstance();
         Drive.getInstance();
         Elevator.getInstance();
         PottyChair.getInstance();
         Stopper.getInstance();
         Turret.getInstance();
         VisionProcessing.getInstance();
         Suspension.getInstance();
         ArduinoSerial.getInstance();
         
        // Show what command your subsystem is running on the SmartDashboard
        SmartDashboard.putData(exampleSubsystem);
    }

    public CommandBase(String name) {
        super(name);
    }

    public CommandBase() {
        super();
    }
}
